<% include partials/header %>
<% include partials/sidebar %>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            角色
            <small>管理</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="/"><i class="fa fa-dashboard"></i>首页</a></li>
            <li><a href="#">系统管理</a></li>
            <li class="active">角色管理</li>
        </ol>
    </section>
    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box" style="margin-bottom:auto">
                    <div class="box-header with-border">
                        <b>工具栏： </b>
                        <caption>
                            <button type="button" class="btn btn-default" id="role_refresh"><i class="fa fa-refresh icon-white"></i> 刷新
                            </button>
                            <button type="button" class="btn btn-success" id="role_add" data-toggle="modal" data-target="#e-dialog-role" data-whatever=""><i class="glyphicon glyphicon-edit icon-white"></i> 新增
                            </button>
                            <button type="button" class="btn btn-info" id="role_edit" data-toggle="modal" id="user-edit"><i class="fa fa-edit icon-white"></i> 编辑
                            </button>
                            <button type="button" class="btn btn-danger" id="role_batch_remove"><i class="fa fa-remove icon-white"></i> 删除
                            </button>
                            <button type="button" class="btn btn-info" id="role_find" onclick="optionUserData(this);"><i class="glyphicon glyphicon-zoom-in icon-white"></i> 详情
                            </button>
                        </caption>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <table id="roles" class="table datatable table-bordered table-hover">
                            <thead>
                            <tr>
                                <th><input value="all" type="checkbox"
                                           onclick="$('.datatable tbody :checkbox').prop('checked', this.checked);"/>
                                </th>
                                <th>角色名称</th>
                                <th>描述</th>
                                <th>创建时间</th>
                                <th>更新时间</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            </tbody>
                        </table>
                    </div>
                    <!-- /.box-body -->
                </div>
                <!-- /.box -->
            </div>
            <!-- /.col -->
        </div>
        <!-- /.row -->
    </section>
    <!-- /.content -->
</div>
<div class="modal fade" id="e-dialog-role" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="exampleModalLabel">角色修改</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" id="e-role-form">
                    <div class="box-body">
                        <input type="hidden" data-name="e_id" name="e_id" id="e_id"/>
                        <div class="form-group">
                            <label for="username" class="col-sm-2 control-label">角色名称</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" name="e_role_name" id="e_role_name" placeholder="请输入角色名称">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="username" class="col-sm-2 control-label">角色描述</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id="e_description" name="e_description" placeholder="请输入角色描述">
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" id="saveRole">保存</button>
            </div>
        </div>
    </div>
</div>
<% include partials/footer %>
<script src="/service/role_manage.js"></script>
